package com.zq.assistant.ui.widget.recyclerview.adapter.cell;

import com.zq.assistant.ui.widget.recyclerview.RecyclerViewHolder;

/**
 * Created by zhangqiang on 17-7-4.
 */

public class MultiCell<T> extends BaseCell<T> {

    private DataBinder<T,RecyclerViewHolder> dataBinder;

    public MultiCell(int layoutId, int spanSize, T data, BaseDataBinder<T> dataBinder) {
        super(layoutId, spanSize, data);
        this.dataBinder = dataBinder;
    }

    @Override
    public final void bindData(RecyclerViewHolder viewHolder) {
        if(dataBinder != null){
            dataBinder.bindData(viewHolder,getData());
        }
    }
}
